{% extends 'admin/base.html' %}
{% block mainbody %}
    <h4>
        商品信息管理
    </h4>
    <table class="table table-bordered table-striped">
        <thead>
            <tr>
                <th>id号</th>
                <th>商品名称</th>
                <th>商品类别</th>
                <th>图片</th>
                <th>单价</th>
                <th>库存</th>
{#                <th>点击量</th>#}
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for vo in goodslist %}
            <tr>
                <td>{{ vo.id }}</td>
                <td>{{ vo.goods }}</td>
                <td>{{ vo.typename }}</td>
                <td><img src="/static/admin/upload/s_{{ vo.picname }}" width="50px"/></td>
                <td>{{ vo.price }}</td>
                <td>{{ vo.store }}</td>
{#                <td>{{ vo.clicknum }}</td>#}
                <td>
                    {% if vo.state == 1 %}
                        新添加
                    {% elif vo.state == 2 %}
                        在售
                    {% else %}
                        下架
                    {% endif %}
                </td>
                <td>
                    <a href="{% url 'myadmin_goods_del' vo.id %}" class="view-link">删除</a> |
                    <a href="{% url 'myadmin_goods_edit' vo.id %}" class="view-link">编辑</a>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
    <div class="page">
        {% for i in pagelist %}
            <a href="{% url 'myadmin_goods_index' i %}">{{ i }}</a>
        {% endfor %}
    </div>
{% endblock %}